import axios from './axios'

export function login (user) {
  return axios({
    url: '/login',
    method: 'post',
    data: {
      username: user.username,
      password: user.password
    }
  })
}

export function regist (user) {
  return axios({
    url: '/regist',
    method: 'post',
    data: {
      username: user.username,
      password: user.password,
      sex: user.sex,
      telnumber: user.telnumber
    }
  })
}

export function logout () {
  return axios({
    url: '/logout',
    method: 'post'
  })
}


